﻿@model IEnumerable<PhotoGallery.Models.User>
@{
    ViewData["Title"] = "用户管理";
    var msg = ViewBag.Msg;
}
<h2>Index</h2>
<p>
    <a asp-action="Create">新增</a>
    &nbsp;&nbsp;
    <a asp-action="Index" asp-controller="AlbumsManager">相册管理</a>
</p>
<table class="table">
    <thead>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.UserName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Name)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.IsEnable)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.LastLoginTime)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.LastLoginIP)
            </th>

            <th>
                @Html.DisplayNameFor(model => model.CreateDate)
            </th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.UserName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Name)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.IsEnable)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.LastLoginTime)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.LastLoginIP)
                </td>

                <td>
                    @Html.DisplayFor(modelItem => item.CreateDate)
                </td>
                <td>
                    <a asp-action="Edit" asp-route-id="@item.UId">编辑</a> |
                    <a asp-action="Details" asp-route-id="@item.UId">详情</a> |
                    <a asp-action="Delete" asp-route-id="@item.UId">删除</a>
                </td>
            </tr>
        }
    </tbody>
</table>
@section scripts{
    @if (!string.IsNullOrEmpty(msg))
    {
        <script>
            notie.alert({ type: 4, text: '@msg' })
        </script>

    }

}
